// Rects and Rooms are used in dungeon generation, see dungeon.h/.c
#ifndef RECT_H_
#define RECT_H_

#define RECTLIST_MAX 32

typedef struct {
	int left;
	int top;
	int right;
	int bottom;
	int z;
} Rect;

typedef struct {
	Rect rect [RECTLIST_MAX];
	int num_rects;
} RectList;

typedef struct { 
	int x,y,z;
} coord_t;

void cut_all_rects (RectList* list, const Rect* cutout, int inc_x, int inc_y);
int point_in_rect (const Rect* r, int x, int y, int z);
int rect_intersect_rect (const Rect* r1, const Rect* r2);
coord_t rect_middle (Rect* r);

#endif
